package br.com.ridea.pegadacultural.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;

import br.com.ridea.pegadacultural.form.EntradaForm;
import br.com.ridea.pegadacultural.utils.Mensagem;

public class EntradaAction extends DispatchAction {

	public ActionForward iniciarProcesso( ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response){
		EntradaForm form = (EntradaForm) actionForm;
		try{
			form.reset(mapping, request);
		}catch (Exception e) {
			form.addMensagem(request, Mensagem.ERRO, e.getMessage());
		}
		return mapping.findForward( "pgInicial" );
	}
	
	
}
